# -*- coding:utf-8 -*-
# @Time: 2020/8/24 15:36
# @Author: liupengfei
# @File: urls.py
from django.urls import path
from rest_framework_jwt.views import refresh_jwt_token, verify_jwt_token
from rest_framework.routers import SimpleRouter
from .views import AdminLoginView, AccountViewSet, MemberViewSet, MenuView, DictView

urlpatterns = [
    path('login/', AdminLoginView.as_view()),
    path('token/refresh/', refresh_jwt_token),
    path('token/verify/', verify_jwt_token),
    path('dict/', DictView.as_view()),
    path('menu/', MenuView.as_view()),
]

router = SimpleRouter()
router.register('member', MemberViewSet)  # 后台会员,CRUD操作
router.register('user', AccountViewSet)  # 后台管理员,CRUD操作

urlpatterns += router.urls
